package com.xiaoyu.lanling.feature.user.viewholder

import `in`.srain.cube.views.list.ViewHolderBase
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.emoji.widget.EmojiTextView
import com.xiaoyu.lanling.R
import com.xiaoyu.lanling.feature.user.model.UserTag

class UserTagViewHolder : ViewHolderBase<UserTag>() {

    private var mTag: EmojiTextView? = null

    override fun createView(layoutInflater: LayoutInflater, parent: ViewGroup): View? {
        val view = layoutInflater.inflate(R.layout.item_user_tag, parent, false)
        mTag = view.findViewById(R.id.tag)
        return view
    }

    override fun showData(position: Int, itemData: UserTag) {
        mTag?.text = itemData.tag
    }
}